package com.sky.config;

import com.sky.properties.BaiDuMapProperties;
import com.sky.utils.BaiDuMapUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class BaiDuMapConfiguration {
    @Bean
    public BaiDuMapUtil baiDuMapUtil(BaiDuMapProperties baiDuMapProperties) {
        return new BaiDuMapUtil(baiDuMapProperties.getUrl(),
                baiDuMapProperties.getOutput(),
                baiDuMapProperties.getAk(),
                baiDuMapProperties.getCallback());
    }
}
